package rolesystem.agentlogic.utilityclasses;

import rolesystem.middle.parameters.DefaultParametersFile;

public class AgentLog 
{
	private long numberofMovements;
	
	private long knownSquare;
	
	private long externalKnownSquare;
	
	private long obstaclesKnown;
	
	private long goodSyncs;
	
	private int mode;
	
	private int alreadyKnownPheromone;
	
	public AgentLog()
	{
		numberofMovements=0;
		knownSquare=0;
		externalKnownSquare=0;
		obstaclesKnown=0;
		goodSyncs=0;
		mode=0;
		alreadyKnownPheromone=0;
	}
	
	public synchronized void setnumberofMovements(final long numberofMovements)
	{
		this.numberofMovements=numberofMovements;
	}
	
	public synchronized void incnumberofMovements()
	{
		this.numberofMovements++;
	}
	
	public synchronized long getnumberofMovements()
	{
		return this.numberofMovements;
	}
	
	public synchronized void setKnownSquare(final long knownSquare)
	{
		this.knownSquare=knownSquare;
	}
	
	public synchronized void incKnownSquare()
	{
		this.knownSquare++;
	}
	
	public synchronized long getKnownSquare()
	{
		return this.knownSquare;
	}
	
	public synchronized void setExternalKnownSquare(final long externalKnownSquare)
	{
		this.externalKnownSquare=externalKnownSquare;
	}
	
	public synchronized void incExternalKnownSquare()
	{
		this.externalKnownSquare++;
	}
	
	public synchronized long getExternalKnownSquare()
	{
		return this.externalKnownSquare;
	}
	
	public synchronized void setObstaclesKnown(final long obstaclesKnown)
	{
		this.obstaclesKnown=obstaclesKnown;
	}
	
	public synchronized void incObstaclesKnown()
	{
		this.obstaclesKnown++;
	}
	
	public synchronized long getObstaclesKnown()
	{
		return this.obstaclesKnown;
	}
	
	public synchronized void setGoodSyncs(final long goodSyncs)
	{
		this.goodSyncs=goodSyncs;
	}
	
	public synchronized void incGoodSyncs()
	{
		this.goodSyncs++;
	}
	
	public synchronized long getGoodSyncs()
	{
		return this.goodSyncs;
	}
	
	public synchronized void setMode(int mode)
	{
		this.mode=mode;
	}
	
	public synchronized long getMode()
	{
		return this.mode;
	}
	
	public synchronized void setAlreadyKnownPheromone(final int alreadyKnownPheromone)
	{
		this.alreadyKnownPheromone=alreadyKnownPheromone;
	}
	
	public synchronized void incAlreadyKnownPheromone()
	{
		this.alreadyKnownPheromone++;
	}
	
	public synchronized long getAlreadyKnownPheromone()
	{
		return this.alreadyKnownPheromone;
	}
	
	public synchronized String getAllAsString()
	{
		String returnString;
		
		returnString= this.getMode() + DefaultParametersFile.data_separator
					  + this.getnumberofMovements() + DefaultParametersFile.data_separator
					  + this.getKnownSquare() + DefaultParametersFile.data_separator  
					  + this.getExternalKnownSquare() + DefaultParametersFile.data_separator  
					  + this.getObstaclesKnown() + DefaultParametersFile.data_separator
					  + this.getGoodSyncs()  + DefaultParametersFile.data_separator
					  + this.getAlreadyKnownPheromone();
		
		return returnString;
	}
	
}
